#include "CustomSAXHandler.h"
#include <iostream>

using namespace std;

CustomSAXHandler::CustomSAXHandler(void)
{
}

CustomSAXHandler::~CustomSAXHandler(void)
{
}

void CustomSAXHandler::startElement(const XMLCh* const name, AttributeList& attributes)
{
    char* message = XMLString::transcode(name);
    cout << "Found element: "<< message << endl;
    XMLString::release(&message);
}

void CustomSAXHandler::fatalError(const SAXParseException& exception)
{
    char* message = XMLString::transcode(exception.getMessage());
    cout << "Fatal Error: " << message
         << " at line: " << exception.getLineNumber()
         << endl;
    XMLString::release(&message);
}
